﻿Public Class proyectoRecurso

    Private Sub proyectoRecurso_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GenericAdministrator.loadComboBox(Me.cboProyecto, ProjectAdministrator.search(), "id", "name")
        GenericAdministrator.loadComboBox(Me.cboRecurso, ResourceAdministrator.search("id, (surname || ', ' || firstname) as name"), "id", "name")

        Me.ReportViewer1.RefreshReport()
    End Sub

    Private Sub btnMostrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMostrar.Click
        Dim projectId As Integer = Me.cboProyecto.SelectedValue
        Dim resourceId As Integer = Me.cboRecurso.SelectedValue
        Me.LISTADO_PROYECTOTableAdapter.Fill(Me.DataSet2.LISTADO_PROYECTO, resourceId, projectId)

        Me.ReportViewer1.RefreshReport()
    End Sub
End Class